Version

SubscriptToIndex(Int32[],Vector) Method

Returns the one-dimensional index that corresponds with the Matrixsubscript.
Syntax
'Declaration
 
Public Shared Function SubscriptToIndex( _
   ByVal subscript() As Integer, _
   ByVal size As Vector _
) As Integer
public static int SubscriptToIndex( 
   int[] subscript,
   Vector size
)

Parameters

subscript
The Matrix subscript.
size
The dimensions of a Matrix.

Return Value

The one-dimensional index represented by the subscript.
Exceptions
ExceptionDescription
System.ArgumentException Occurs when size is empty.
System.ArgumentExceptionOccurs when the number of subscript elements does not match the specified size.
System.ArgumentOutOfRangeException Occurs when a subscript is out of the range specified by the dimensions.
System.ArgumentException Occurs when a dimensions is less than 1.
System.ArgumentException Occurs when the size Vector has non-integer elements.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also